<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="a.header.jsp" %>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head> 
 <body>
<!--  /layuiproject/WebContent/4弹出层/a2js动态添加复选框.jsp -->

<div id="test"></div>


<script>
var odiv=document.getElementById("test");
var input=document.createElement("input");
input.setAttribute("type","text");
input.setAttribute("value","测试");
var text=document.createTextNode("一个文本");
odiv.append(input);
odiv.append(text);
</script>
</body>

</html>